package com.example.opengl.ui.second;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;

import com.example.opengl.databinding.FragmentPageSecondBinding;

/**
 * A placeholder fragment containing a simple view.
 */
public class PageSecondFragment extends Fragment implements View.OnClickListener {

    private PageSecondViewModel pageViewModel;
    private FragmentPageSecondBinding binding;

    public static PageSecondFragment newInstance() {
        PageSecondFragment fragment = new PageSecondFragment();
        Bundle bundle = new Bundle();
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        pageViewModel = new ViewModelProvider(this,
                new ViewModelProvider.NewInstanceFactory()).get(PageSecondViewModel.class);
    }

    @Override
    public View onCreateView(
            @NonNull LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        //===
        binding = FragmentPageSecondBinding.inflate(inflater, container, false);
        View root = binding.getRoot();
        //===

        //===
        return root;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        binding = null;
    }

    @Override
    public void onClick(View v) {

    }
}